PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

References to Files

You can use either of these forms to refer to any file:

file nameString alias nameString

where

nameString is a string of the form " Disk : Folder1 : Folder2 :...: Filename " that specifies exactly where the file is stored or a string that consists of the file's name only. Disk specifies the disk on the local computer on which the application is stored, Folder1 : Folder2 :... specifies the sequence of folders that you would have to open to find the application on the local computer, and fileName specifies the name of the file. File systems in the Mac OS don't normally distinguish uppercase letters from lowercase letters in filenames, although applications such as AppleWorks may distinguish case in document, window, or other object names.

If nameString consists of the file's name only, AppleScript attempts to locate the file in the current directory for the application from which the script is being run (for example, Script Editor). The current directory is the folder or volume whose contents you can see when you choose Open, Save, or a related command from the application's File menu. The current directory is typically the directory where the application was launched, the directory where the application last opened or saved a previous document, or another directory specified by the application. The current directory may be affected by settings in the General Controls control panel.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)